Understanding the controls Attribute
In HTML, the controls attribute is used with <video> and <audio> elements. It tells the browser to display built-in playback controls, such as play, pause, volume, and seek bar, so users can interact with the media.
It works with both <video> and <audio> elements.
When present, it shows the browser’s default player interface (play/pause button, timeline, volume, etc.).
It is a Boolean attribute — meaning you don’t need to assign it a value (just writing controls is enough).
Without controls, the media can only be controlled through JavaScript or autoplay.
In short: The controls attribute makes media interactive by showing play, pause, volume, and other basic controls to the user.